<extend name="public@base5"/>
<block name="main">
    <div class="wrap">
        <php>$app_name=input('param.name');</php>
        <if condition="in_array($app_name,['demo','portal'])">
            <div class="alert alert-danger">
                {:lang('UNINSTALL_APP_DANGER_MSG',['app_name'=>"<code>$app_name</code>"])}<br>
            </div>
            <div class="alert alert-danger">
                {:lang('UNINSTALL_APP_CONFIRM_MSG',['app_name'=>"<code>$app_name</code>"])}<br>
            </div>
            <div class="alert alert-danger">
                {:lang('UNINSTALL_APP_MSG',['app_name'=>"<code>$app_name</code>"])}<br>
            </div>
            <form method="delete" class="row g-3 js-ajax-form" action="admin/apps">
                <div class="col-12">
                    <label for="input-confirm_name" class="form-label">
                        {:lang('App Name')}<span class="form-required">*</span>
                    </label>
                    <input type="text" class="form-control"
                           id="input-confirm_name" name="confirm_name"
                           placeholder="{:lang('Please enter the name of the app',['app_name'=>$app_name])}">
                </div>
                <div class="col-12">
                    <label for="input-url" class="form-label">
                        {:lang('Website founder password')}<span class="form-required">*</span>
                    </label>
                    <input type="password" class="form-control"
                           id="input-url" name="password"
                           placeholder="{:lang('Please enter the website founder password')}">
                </div>
                <div class="col-12 d-grid">
                    <input type="hidden" name="name" value="{$app_name}"/>
                    <button type="submit" class="btn btn-danger js-ajax-submit btn-block"
                            data-msg="{:lang('UNINSTALL_APP_LAST_DANGER_MSG',['app_name'=>$app_name])}">
                        {:lang('Uninstall app')}
                    </button>
                </div>
            </form>
            <else/>
            <div>{:lang('UNINSTALL_APP_EXEC_COMMAND_MSG')}</div>
            <div class="alert alert-danger">
                php think uninstall:app {$app_name}
            </div>
        </if>
    </div>
</block>